<template>
  <div class="con">
    <div>
      <el-image
        v-if="userStore.user?.imgUrl"
        style="width: 180px; height: 180px"
        :src="base + userStore.user?.imgUrl"
        fit="cover"
      />
      <el-image
        v-else
        style="width: 180px; height: 180px"
        src="/src/assets/moren_tu.jpg"
        alt=""
        fit="cover"
      />
    </div>
    <div class="info">
      <p>用户名称：{{ userStore.user?.username }}</p>
      <p>角色名称：{{ userStore.user?.name }}</p>
      <p>用户电话：{{ userStore.user?.phone }}</p>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useUserStore } from '@/stores/modules/user'
import {  useRoute } from 'vue-router'
const route = useRoute()
const base = import.meta.env.VITE_APP_BASE_API
const userStore = useUserStore()
</script>

<style lang="scss" scoped>
.con {
  display: flex;
  .info {
    padding: 20px;
    p {
      margin-bottom: 20px;
    }
  }
}
</style>
